#ifndef SYSTEM_H
#define SYSTEM_H

class AbstractSystem;

#include <QList>
#include <QPointF>
#include <math.h>
#include "../Motors/abstractmotor.h"
#include "../Sensors/motorstatesensor.h"
#include "../Sensors/positionsensor.h"

class AbstractSystem
{
public:
    AbstractSystem();
    virtual ~AbstractSystem();
    QList<double> state();
    void setConsign(QList<double> cons);
    virtual void checkValue(int id)=0;
    double getMotorState(int id);
    virtual double getMotorStateNormee(int id) = 0;
    void setMotorState(int id, double s);
    virtual void setPosition(double x, double y, double theta);
    virtual void setParameters(QList<double> params) = 0;
    virtual void addMotor(int freq, double delay, double tau, double imprecision)=0;
    virtual void addSensor(int freq, double delay, double imprecision)=0;
    void addPositionSensor(int freq, double delay, double imprecision);
    virtual QList<double> getPosition()=0;
    virtual QList<double> getPositionNormee()=0;
    int nbMotor(){return motors.size();}
    virtual void setInState(QList<double> state)=0;
protected:
    PositionSensor *pos;
    QList<AbstractMotor*> motors;
    QList<MotorStateSensor*> sensors;
};

#endif // SYSTEM_H
